# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sg3_utils
pkgver=1.47
pkgrel=0
pkgdesc="Generic SCSI utilities"
url="http://sg.danny.cz/sg/sg3_utils.html"
arch="all"
options="!check"  # No test suite.
license="BSD-2-Clause AND GPL-2.0-or-later"
makedepends="linux-headers"
subpackages="$pkgname-dev $pkgname-doc"
source="http://sg.danny.cz/sg/p/sg3_utils-$pkgver.tgz
	unsigned-int.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
27e43eb1103d6fb321af106964e56b800688ee74ebc47201cda1f29703ddaa34655cb0a6ce926952fdb66e10904e32dda4ca448789e9305a02d55f5477d5d21d  sg3_utils-1.47.tgz
e288986ef0cdb6a6a07fea51bbeb02f8071eb689eecab8f91c4a6a82528bbed865e1c7b76bc4a5d8236eff1d11e09214ad1d443704b32427d849e2af0cedbb23  unsigned-int.patch
"
